<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    body,html {
        height: 100%;
    }
    .container{
        background-color: aqua;
        width: auto;
        height: 100%;
       display: flex;
       /* 纵向排列 */
       flex-direction: column;
    }
    .header{
        background-color: antiquewhite;
        height: 150px;
    }
    .main{
        display: flex;
        flex-direction: row;
        flex: auto;
    }
    .footer{
        background-color: antiquewhite;
        height: 150px;
    }
    .left{
       flex-basis: 200px;
       background-color: chocolate;
    }
    .middle{
       flex: auto;
    }
    .right{
      flex-basis: 200px;
      background-color: chocolate;
    }
    </style>
</head>
<body>
    <div class="container">
        <div class="header"></div>
        <div class="main">
     <div class="left"></div>
     <div class="middle"></div>
     <div class="right"></div>
        </div>
        <div class="footer"></div>       
    </div>
</body>
</html>